package com.nightsoul.commons.chain.test;

import org.apache.commons.chain.Context;
import org.apache.commons.chain.impl.ChainBase;
import org.apache.commons.chain.impl.ContextBase;

public class MyChain extends ChainBase {
	
	public MyChain() {
		this.addCommand(new ExceptionFilter());
		this.addCommand(new MyCommand1());
		this.addCommand(new MyFilter1());
		this.addCommand(new MyFilter2());
		this.addCommand(new MyCommand2());
		this.addCommand(new MySubChain());
	}
	
	
	public static void main(String[] args) throws Exception {
		MyChain myChain = new MyChain();
		Context context = new ContextBase();
		myChain.execute(context);
		System.out.println("finished");
	}
}
